﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JjProducts.aspx.cs" Inherits="UI.ModSalary.JjProducts" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>产品列表及工序定义</title>
       <link rel="stylesheet" type="text/css" href="../Styles/BaseStyle.css" />
        <script type="text/javascript" src="../JS/jsFunction.js"></script>
         <script type="text/javascript" src="../JS/calendar.js"></script>
        <script type="text/javascript">
            function aclose(a, b, c, d, e,f,g) {
                this.document.forms[0].txtProCode.value = a;
                this.document.forms[0].txtName.value = b;          
                this.document.forms[0].txtProModel.value = c;
                this.document.forms[0].txtTypeName.value = d;
                this.document.forms[0].txtUnit.value = e;               
            }
    </script>
    <style type="text/css">
        .style1
        {
            text-align: left;
        }
      
    </style>
</head>
<body>
    <form id="form1" runat="server">
     <table class="pagetop">
        <tr>
            <td>
                <div class="pagetopleft">
                    定义计件产品</div>
            </td>
            <td>
                <div class="pagetopright">
                <asp:RadioButton ID="rbOpen" runat="server" Checked="True" GroupName="pro" Text="开启" />
        <asp:RadioButton ID="rbClose" runat="server" GroupName="pro" Text="关闭" />
    &nbsp;<asp:TextBox ID="txtSerWord" runat="server" CssClass="InputCss" Width="90px"
                   ></asp:TextBox>
    &nbsp;<asp:Button ID="btnProSearch" runat="server" Text="查询" 
            CssClass="InputCss" onclick="btnProSearch_Click"   />
                       
                </div>
            </td>
        </tr>
    </table>

    
     <table border="1px" style="width:100%; border-collapse:separate; border-color:Black; ">
     <tr>
     <td valign="top">
       
      <asp:GridView ID="gvList" runat="server" AutoGenerateColumns="False"  
            HorizontalAlign="Center" Width="99%"  CssClass="td" 
            onrowcommand="gvProducts_RowCommand" CellPadding="4" ForeColor="#333333" 
             GridLines="None">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
      <Columns>

                  <asp:TemplateField HeaderText="编号"  SortExpression="ProCode">
                    <ItemTemplate>
                        <a style="cursor: hand" onclick="javascript:aclose('<%# Eval("ProCode") %>','<%# Eval("Name") %>','<%# Eval("ProModel") %>','<%# Eval("TypeName") %>','<%# Eval("Unit") %>')">
                            <%# Eval("ProCode")%></a>
                    </ItemTemplate>
                </asp:TemplateField>
           
              <asp:TemplateField HeaderText="产品名称"  SortExpression="Name">
                    <ItemTemplate>
                        <a style="cursor: hand" onclick="javascript:aclose('<%# Eval("ProCode") %>','<%# Eval("Name") %>','<%# Eval("ProModel") %>','<%# Eval("TypeName") %>','<%# Eval("Unit") %>')">
                            <%# Eval("Name")%></a>
                    </ItemTemplate>
                </asp:TemplateField>
              <asp:BoundField DataField="ProModel" HeaderText="型号" SortExpression="ProModel">
               
            </asp:BoundField>
              <asp:BoundField DataField="TypeName" HeaderText="类别" SortExpression="TypeName">
               
            </asp:BoundField>
              <asp:BoundField DataField="Unit" HeaderText="单位" SortExpression="Unit">              
            </asp:BoundField>
           
              <asp:TemplateField HeaderText="操作" HeaderStyle-Width="100px">                
                <itemtemplate>
                 <a href="javascript:ShowLink('JjProcess.aspx?ProCode=<%# Eval("ProCode")%>',640,480)">工序</a>
                 <asp:LinkButton ID="lbtnClose"  CommandArgument='<%# Eval("ProCode") %>'  CommandName="cmdClose" runat="server">关闭</asp:LinkButton> 
                 <asp:LinkButton ID="lbtnDelete"  CommandArgument='<%# Eval("ProCode") %>'  CommandName="cmdDelete" runat="server" >删除</asp:LinkButton> 

  </itemtemplate> 
                </asp:TemplateField>

        </Columns>         
                        <AlternatingRowStyle BackColor="#F7F7F7" />
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
    </asp:GridView>

    </td>
     <td style="width:200px; vertical-align:top;">
     <br />
         <table align="left" width="100%" style="font-size:9pt;">
             <tr>
                 <td>
                    编号</td>
                 <td>
                   
            
                <asp:TextBox ID="txtProCode" runat="server" CssClass="InputCss" Width="80px"
                    onkeydown="if(event.keyCode==13)event.keyCode=9"></asp:TextBox>
                    
                 </td>
             </tr>
             <tr>
                 <td>
                    名称</td>
                 <td>
            
                <asp:TextBox ID="txtName" runat="server" CssClass="InputCss" Width="120px"
                    onkeydown="if(event.keyCode==13)event.keyCode=9"></asp:TextBox>
                 </td>
             </tr>
             <tr>
                 <td>
                    型号</td>
                 <td>
                     
            
                <asp:TextBox ID="txtProModel" runat="server" CssClass="InputCss" Width="120px"
                    onkeydown="if(event.keyCode==13)event.keyCode=9"></asp:TextBox>
                    
                 </td>
             </tr>
             <tr>
                 <td>
                    类别</td>
                 <td>
            
                <asp:TextBox ID="txtTypeName" runat="server" CssClass="InputCss" Width="90px"
                    onkeydown="if(event.keyCode==13)event.keyCode=9"></asp:TextBox>
                 </td>
             </tr>
             <tr>
                 <td>
                     单位</td>
                 <td>
            
                <asp:TextBox ID="txtUnit" runat="server" CssClass="InputCss" Width="70px"
                    onkeydown="if(event.keyCode==13)event.keyCode=9"></asp:TextBox>
                 </td>
             </tr>
             
             <tr>
                 <td>
                     &nbsp;</td>
                 <td>
        <asp:Button ID="btnAdd" runat="server" Text="增加" Width="35px" 
            CssClass="InputCss" onclick="btnAdd_Click"  />
        &nbsp;<asp:Button ID="btnUpdate" runat="server" Text="更新" Width="35px" 
            CssClass="InputCss" onclick="btnUpdate_Click"  />
                 </td>
             </tr>
            
         </table>
         </td>
     </tr>
     </table>
    
    </form>
</body>
</html>
